//
//  HelpViewController.m
//  XDLBaseProject
//
//  Created by 谢东来 on 2019/9/17.
//  Copyright © 2019 Apple. All rights reserved.
//

#import "HelpViewController.h"

@interface HelpViewController ()

@property (strong, nonatomic) UIScrollView *scrollView;

@end

@implementation HelpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"帮助";
    self.view.backgroundColor = [UIColor whiteColor];
    [self createSubViews];
}

- (void)createSubViews {
    self.scrollView = [[UIScrollView alloc] initWithFrame:(CGRectMake(0, 0, kScreenW, kScreenH - kTopBarH))];
//    self.scrollView.backgroundColor = randomColor;
//    self.scrollView.bounces = NO;
    self.scrollView.contentSize = CGSizeMake(kScreenW, kScreenW*1.613-(kScreenH-kTopBarH));
    [self.view addSubview:self.scrollView];
    
//    UIImageView *imv = [[UIImageView alloc] initWithFrame:(CGRectMake(0, X_Real(0), kScreenW, kScreenW*1.613))];
//    imv.image = [UIImage imageNamed:@"help.png"];
//    [self.scrollView addSubview:imv];
    
    UIView *v = [UIView newAutoLayoutView];
    [self.view addSubview:v];
    [v autoPinEdgeToSuperviewEdge:(ALEdgeLeft) withInset:X_Real(10)];
    [v autoPinEdgeToSuperviewEdge:(ALEdgeRight) withInset:X_Real(10)];
    [v autoPinEdgeToSuperviewEdge:(ALEdgeTop) withInset:Y_Real(10)];
    [v autoPinEdgeToSuperviewEdge:(ALEdgeBottom) withInset:Y_Real(10)];

    UILabel *lab = [UILabel newAutoLayoutView];
    lab.textColor = UIColorFromHex(0x292421);
    lab.numberOfLines = 0;
    lab.font = [AppFont getFont_14];
    [v addSubview:lab];
    [lab autoPinEdgeToSuperviewEdge:(ALEdgeLeft)];
    [lab autoPinEdgeToSuperviewEdge:(ALEdgeRight)];
    [lab autoPinEdgeToSuperviewEdge:(ALEdgeTop)];
    lab.text = [NSString stringWithFormat:@"    1.如果网页内容很多,保存后的图片是分好多部分吗?\n\n        不是的,我们保存后的网页会以长图的形式展现,你加载了多少内容,就可以保存多少内容在一张图上.\n\n\n    2.为什么有时候我保存的图片会有一些空白的区域?\n\n        说明网页的内容内容没有完全加载,需要上下滑动,保证网页全部内容在屏幕中出现过,这样就会将内容保存完整.\n\n\n    3.我保存的文件在哪里找?\n\n        png 和 jpg  格式的图片除了保存在本地文件夹,还会出现在相册中,而 HTML 文件和 PDF 文件则直接保存在本地的同名文件夹中,需要在电脑上查看相应的内容."];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
